<?php
	$id = $this->uri->segment(4,0);

	foreach($query->result() as $row):
	$im = imagecreatefromstring($row->images_large);
	
	if ($im !== "") {
	    header('Content-Type: image/jpeg');
	    imagejpeg($im);
	    imagedestroy($im);
	} else {
	    echo "<img src='base_url()images/nopicture.jpg' />";
	}
	
	endforeach;
?>